import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import settings from './modules/settings'
import getters from './getters'

Vue.use(Vuex)
import {Notification} from 'element-ui'

export default new Vuex.Store({
    state: {},
    mutations: {
        /*无效的按钮点击提示*/
        invalidBtnAlert: function () {
            Notification.warning({title: '点我干哈？', message: '再点也没有东西出来的啦~ ~', showClose: false})
        }
    },
    actions: {
        /*无效的按钮点击提示*/
        invalidBtnAlertAction:function (context) {
            context.commit("invalidBtnAlert")
        }
    },
    modules: {
        user,
        settings
    },
    getters
})
